import request from '@/utils/request'

// 玩家账户列表
export function getPlayer(params: any) {
  return request({
    url: '/v1/user/list',
    method: 'get',
    params: params
  })
}

// 玩家账户列表-汇总
export function getPlayerCollect(params: any) {
  return request({
    url: '/v1/user/getUserToday',
    method: 'get',
    params: params
  })
}

// 玩家账户-封禁
export function playerBan(data: any) {
  return request({
    url: '/v1/user/ban',
    method: 'post',
    data: data
  })
}

// 玩家账户封禁列表
export function getBanPlayer(params: any) {
  return request({
    url: '/v1/user/banList',
    method: 'get',
    params: params
  })
}

// 玩家游戏记录
export function getGameReport(params: any) {
  return request({
    url: '/v1/game/logList',
    method: 'get',
    params: params
  })
}

// 玩家游戏记录-游戏详情
export function getGameDetails(params: any) {
  return request({
    url: '/v1/game/getGameLogDetail',
    method: 'get',
    params: params
  })
}

// 玩家游戏记录-小游戏详情
export function getGameMiniReport(params: any) {
  return request({
    url: '/v1/game/getSmallGameDetailByAccountIdAndRoundId',
    method: 'get',
    params: params
  })
}

// 玩家游戏记录-导出
export function getGameExport(params: any) {
  return request({
    url: '/v1/game/exportGameLogList',
    method: 'get',
    params: params
  })
}

// 玩家详情
export function getPlayerDetails(params: any) {
  return request({
    url: '/v1/user/userDetails',
    method: 'get',
    params: params
  })
}

// 玩家详情-金币走势
export function getPlayerGold(params: any) {
  return request({
    url: '/v1/user/userAmountChange',
    method: 'get',
    params: params
  })
}

// 玩家游戏详情
export function getGameReportDetails(params: any) {
  return request({
    url: '/v1/game/detailsLog',
    method: 'get',
    params: params
  })
}

// 玩家详情-用户投注档位
export function getBetGearDetails(params: any) {
  return request({
    url: '/v1/user/getUserBetGear',
    method: 'get',
    params: params
  })
}

// 实时在线
export function getTimeOnline(params: any) {
  return request({
    url: '/v1/admin/player/onlinePersonList',
    method: 'get',
    params: params
  })
}

// 实时登录
export function getTimeLogin(params: any) {
  return request({
    url: '/v1/admin/player/loginPersonList',
    method: 'get',
    params: params
  })
}

// 每日最高在线
export function getHeightOnline(params: any) {
  return request({
    url: '/v1/admin/player/dailyMaxOnlineList',
    method: 'get',
    params: params
  })
}

// 每日最高登录
export function getHeightLogin(params: any) {
  return request({
    url: '/v1/admin/player/dailyMaxLoginList',
    method: 'get',
    params: params
  })
}
// 登录日志
export function getPlayerLoginLogList(params: any) {
  return request({
    url: '/v1/admin/player/loginLogList',
    method: 'get',
    params: params
  })
}

// 用户统计
export function getAgentUsers(params: any) {
  return request({
    url: '/v1/admin/player/agentUsersList',
    method: 'get',
    params: params
  })
}

// 用户统计-商户旗下玩家
export function getTmerchantPlayers(params: any) {
  return request({
    url: '/v1/admin/player/agentUsersTrends',
    method: 'get',
    params: params
  })
}

// 玩家留存
export function getTimeRemain(params: any) {
  return request({
    url: '/v1/admin/player/agentUsersTrends',
    method: 'get',
    params: params
  })
}
// 玩家留存-折线图
export function getTimeRemainChart(params: any) {
  return request({
    url: '/v1/admin/player/agentUsersTrends',
    method: 'get',
    params: params
  })
}
// 玩家-设置玩家账号类型
export function setPlyerType(data: any) {
  return request({
    url: '/v1/user/setUserTestType',
    method: 'put',
    data: data
  })
}

// 订单列表
export function getOrder(params: any) {
  return request({
    url: '/v1/admin/player/orderList',
    method: 'get',
    params: params
  })
}
// 订单列表-处理
export function actionOrder(data: any) {
  return request({
    url: '/v1/admin/player/orderChangeStatus',
    method: 'put',
    data: data
  })
}
// 订单列表-有下注，没有验证的牌局编号
export function getNotValid(params: any) {
  return request({
    url: '/v1/admin/player/getNotValidRoundIdList',
    method: 'get',
    params: params
  })
}

// 钱包转账记录
export function getWalletTransfer(params: any) {
  return request({
    url: '/v1/game/transferRecordList',
    method: 'get',
    params: params
  })
}

// 添加/取消 - 玩家个人rtp调控
export function changeControlUser(data: any) {
  return request({
    url: '/v1/user/controlUserGameRtp',
    method: 'post',
    data: data
  })
}
// 添加/取消 - 批量玩家个人rtp调控
export function changeAllControlUser(data: any) {
  return request({
    url: '/v1/user/batchControlUserGameRtp',
    method: 'post',
    data: data
  })
}

// 查询玩家个人rtp调控
export function getControlUser (params: any) {
  return request({
    url: '/v1/user/getCurrentAgentRtpControlRecordList',
    method: 'get',
    params: params
  })
}